<div id="main">
    <div id="primary">
        <div id="content" role="main">
            <?php foreach ($articles as $article):?>
            <article class="post type-post status-publish format-standard hentry category-uncategorized">
                <header class="entry-header">
                    <h1 class="entry-title"><a href="<?php echo base_url();?>index.php/post/<?php echo $article['id']?>" title="Permalink to <?php echo $article['title'] ?>" rel="bookmark"><?php echo $article['title'] ?></a></h1>
                    <div class="entry-meta">
                        <span class="sep">Posted on </span>
                        <a href="<?php echo base_url();?>index.php/post/<?php echo $article['id']?>" title="<?php echo $article['time'] ?>" rel="bookmark">
                            <time class="entry-date" datetime="<?php echo $article['fulltime'] ?>" pubdate><?php echo $article['date'] ?></time>
                        </a>
                        <span class="by-author"> 
                            <span class="sep"> by </span> 
                            <span class="author vcard">
                                <a class="url fn n" href="<?php echo base_url();?>index.php/author/<?php echo $article['author_id']?>" title="View all posts by <?php echo $article['author'] ?>" rel="author"><?php echo $article['author'] ?></a>
                            </span>
                        </span>
                    </div><!-- .entry-meta -->

                    <div class="comments-link">
                        <a href="<?php echo base_url();?>index.php/post/<?php echo $article['id']?>#comments" title="Comment on <?php echo $article['title'] ?>"><?php echo $article['comment_count'] ?></a>
                    </div>
                </header><!-- .entry-header -->

                <div class="entry-content">
                    <p>
                        <?php echo $article['entry_content'] ?>
                    </p>
                </div><!-- .entry-content -->

                <footer class="entry-meta">
                    <span class="cat-links">
                    <span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> <a href="http://localhost/ysys/wordpress/?cat=1" title="View all posts in <?php echo $article['category'] ?>" rel="category"><?php echo $article['category'] ?></a></span>

                    <span class="sep"> | </span>
                    <span class="comments-link"><a href="<?php echo base_url();?>index.php/post/<?php echo $article['id']?>#comments" title="Comment on <?php echo $article['title'] ?>"><b><?php echo $article['comment_count'] ?></b> Reply</a></span>
                </footer><!-- #entry-meta -->
            </article><!-- #post-1 -->
            <?php endforeach; ?>
        </div><!-- #content -->
    </div><!-- #primary -->
    
    <?php $this->load->view('includes/sidebar');?>
</div><!-- #main -->